Plot Data
library(ggplot2)
# raw data
ggplot(dataset, aes(x=Olaparib, y=Counts)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_smooth(method=lm, formula = y ~poly(x, 2), se=FALSE, aes(colour=siRNA)) +
geom_point(aes(colour=siRNA, shape=Experiment), size=2) +
facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)") +
scale_shape_manual(values=15:20) +
scale_color_manual(values=c("#000000","#FF0000"))

# NormCounts Linear
ggplot(dataset, aes(x=Olaparib, y=NormCounts, color=siRNA)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(aes(colour=siRNA), size=2) +
geom_smooth(method=lm, formula = y ~ x, se=FALSE) +
facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)") +
scale_color_manual(values=c("#000000","#FF0000"))

# NormCounts2 Linear
ggplot(dataset, aes(x=Olaparib, y=NormCounts2, color=siRNA)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(aes(colour=siRNA), size=2) +
geom_smooth(method=lm, formula = y ~ x, se=FALSE) +
facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)") +
scale_color_manual(values=c("#000000","#FF0000"))

# NormCounts Quadratic
ggplot(dataset, aes(x=Olaparib, y=NormCounts, color=siRNA)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(aes(colour=siRNA), size=2) +
geom_smooth(method=lm, formula = y ~poly(x, 2), se=FALSE) +
facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)")+
scale_color_manual(values=c("#000000","#FF0000"))

# NormCounts2 Quadratic
ggplot(dataset, aes(x=Olaparib, y=NormCounts2, color=siRNA)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(aes(colour=siRNA), size=2) +
geom_smooth(method=lm, formula = y ~poly(x, 2), se=FALSE) +
facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)") +
scale_color_manual(values=c("#000000","#FF0000"))

# NormCounts Cubic
ggplot(dataset, aes(x=Olaparib, y=NormCounts, color=siRNA)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(aes(colour=siRNA), size=2) +
geom_smooth(method=lm, formula = y ~ poly(x, 3), se=FALSE) +
facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)")+
scale_color_manual(values=c("#000000","#FF0000"))

# NormCounts2 Cubic
ggplot(dataset, aes(x=Olaparib, y=NormCounts2, color=siRNA)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(aes(colour=siRNA), size=2) +
geom_smooth(method=lm, formula = y ~ poly(x, 3), se=FALSE) +
facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)") +
scale_color_manual(values=c("#000000","#FF0000"))

library(Cairo)
cairo_pdf("FigureS1C.pdf", width = 5, height = 4, family = "Arial")
ggplot(dataset, aes(x=Olaparib, y=NormCounts2)) +
theme_bw() +
theme(panel.grid.major=element_blank(), panel.grid.minor=element_blank(),
axis.line = element_line(colour = "black"), text = element_text(size=14),
panel.border = element_blank(), panel.background = element_blank()) +
geom_point(aes(colour = siRNA, shape = genotype), size=1.75) +
geom_smooth(method=lm, formula = y ~ poly(x,3), se=TRUE,
aes(group = GSID,colour = siRNA, linetype = genotype), fill='#DDDDDD', size=0.5) +
#facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)") +
ylab(label = "Normalized Counts") +
scale_color_manual(values=c("#000000","#FF0000")) +
guides(linetype = guide_legend(override.aes= list(color = "#555555")))
dev.off()
## quartz_off_screen
## 2
Models
library(MASS)
library(DHARMa)
library(lme4)
library(lmerTest)
library(bbmle)
Linear formula
fit1 <- lm(Counts ~ Experiment + Olaparib*siRNA*genotype, data = dataset)
print(summary(fit1))
##
## Call:
## lm(formula = Counts ~ Experiment + Olaparib * siRNA * genotype,
## data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -107.230 -24.808 -4.373 23.873 126.007
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 234.2303 24.6661 9.496 1.41e-11 ***
## Experimentexp2 50.6875 15.9414 3.180 0.00293 **
## Experimentexp3 105.2500 15.9414 6.602 8.53e-08 ***
## Olaparib -52.4585 10.1314 -5.178 7.61e-06 ***
## siRNAsiPARP1 -6.6819 32.3638 -0.206 0.83753
## genotypeALC1KO -112.8260 32.3638 -3.486 0.00125 **
## Olaparib:siRNAsiPARP1 10.4594 14.3280 0.730 0.46987
## Olaparib:genotypeALC1KO 0.8931 14.3280 0.062 0.95062
## siRNAsiPARP1:genotypeALC1KO 80.8501 45.7693 1.766 0.08535 .
## Olaparib:siRNAsiPARP1:genotypeALC1KO -6.6476 20.2628 -0.328 0.74466
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 45.09 on 38 degrees of freedom
## Multiple R-squared: 0.8338, Adjusted R-squared: 0.7944
## F-statistic: 21.18 on 9 and 38 DF, p-value: 3.24e-12
cat("AIC: ", AIC(fit1))
## AIC: 512.6341
simres <- simulateResiduals(fittedModel = fit1)
plot(simres)

fit2 <- lm(NormCounts ~ Olaparib*siRNA*genotype, data = dataset)
print(summary(fit2))
##
## Call:
## lm(formula = NormCounts ~ Olaparib * siRNA * genotype, data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.4485 -0.1338 -0.0444 0.1440 0.3723
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.51901 0.09902 15.340 < 2e-16 ***
## Olaparib -0.27936 0.04384 -6.373 1.42e-07 ***
## siRNAsiPARP1 -0.13321 0.14004 -0.951 0.3472
## genotypeALC1KO 0.70978 0.14004 5.068 9.52e-06 ***
## Olaparib:siRNAsiPARP1 0.07170 0.06200 1.157 0.2543
## Olaparib:genotypeALC1KO -0.38205 0.06200 -6.162 2.79e-07 ***
## siRNAsiPARP1:genotypeALC1KO -0.54819 0.19804 -2.768 0.0085 **
## Olaparib:siRNAsiPARP1:genotypeALC1KO 0.29507 0.08768 3.365 0.0017 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1951 on 40 degrees of freedom
## Multiple R-squared: 0.8936, Adjusted R-squared: 0.8749
## F-statistic: 47.98 on 7 and 40 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit2))
## AIC: -11.42023
simres <- simulateResiduals(fittedModel = fit2)
plot(simres)

fit3 <- lm(NormCounts2 ~ Olaparib*siRNA*genotype, data = dataset)
print(summary(fit3))
##
## Call:
## lm(formula = NormCounts2 ~ Olaparib * siRNA * genotype, data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.18174 -0.08375 -0.03222 0.08930 0.17202
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.10392 0.05572 19.813 < 2e-16 ***
## Olaparib -0.20302 0.02467 -8.231 3.86e-10 ***
## siRNAsiPARP1 -0.05144 0.07880 -0.653 0.5176
## genotypeALC1KO -0.20071 0.07880 -2.547 0.0148 *
## Olaparib:siRNAsiPARP1 0.04531 0.03488 1.299 0.2014
## Olaparib:genotypeALC1KO -0.06501 0.03488 -1.864 0.0697 .
## siRNAsiPARP1:genotypeALC1KO 0.22082 0.11144 1.982 0.0544 .
## Olaparib:siRNAsiPARP1:genotypeALC1KO 0.01849 0.04933 0.375 0.7098
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1098 on 40 degrees of freedom
## Multiple R-squared: 0.9035, Adjusted R-squared: 0.8866
## F-statistic: 53.5 on 7 and 40 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit3))
## AIC: -66.62439
simres <- simulateResiduals(fittedModel = fit3)
plot(simres)

fit4 <- lmer(Counts ~ Olaparib*siRNA*genotype + (1|UID), data = dataset)
print(summary(fit4))
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Counts ~ Olaparib * siRNA * genotype + (1 | UID)
## Data: dataset
##
## REML criterion at convergence: 444
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -1.90616 -0.53229 0.01726 0.51233 2.31632
##
## Random effects:
## Groups Name Variance Std.Dev.
## UID (Intercept) 3446 58.7
## Residual 1391 37.3
## Number of obs: 48, groups: UID, 12
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) 286.2095 38.8194 11.2590 7.373
## Olaparib -52.4585 8.3818 32.0000 -6.259
## siRNAsiPARP1 -6.6819 54.8990 11.2590 -0.122
## genotypeALC1KO -112.8260 54.8990 11.2590 -2.055
## Olaparib:siRNAsiPARP1 10.4594 11.8537 32.0000 0.882
## Olaparib:genotypeALC1KO 0.8931 11.8537 32.0000 0.075
## siRNAsiPARP1:genotypeALC1KO 80.8501 77.6389 11.2590 1.041
## Olaparib:siRNAsiPARP1:genotypeALC1KO -6.6476 16.7637 32.0000 -0.397
## Pr(>|t|)
## (Intercept) 1.23e-05 ***
## Olaparib 5.15e-07 ***
## siRNAsiPARP1 0.9053
## genotypeALC1KO 0.0638 .
## Olaparib:siRNAsiPARP1 0.3842
## Olaparib:genotypeALC1KO 0.9404
## siRNAsiPARP1:genotypeALC1KO 0.3196
## Olaparib:siRNAsiPARP1:genotypeALC1KO 0.6943
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) Olaprb sRNAsPARP1 gALC1K Ol:RNAPARP1 O:ALC1 sRNAPARP1:
## Olaparib -0.401
## siRNAsPARP1 -0.707 0.284
## gntypALC1KO -0.707 0.284 0.500
## Ol:RNAPARP1 0.284 -0.707 -0.401 -0.201
## Olpr:ALC1KO 0.284 -0.707 -0.201 -0.401 0.500
## sRNAPARP1:A 0.500 -0.201 -0.707 -0.707 0.284 0.284
## O:RNAPARP1: -0.201 0.500 0.284 0.284 -0.707 -0.707 -0.401
cat("AIC: ", AIC(fit4))
## AIC: 464.0374
simres <- simulateResiduals(fittedModel = fit4)
plot(simres)

Quadratic formula
fit5 <- lm(Counts ~ Experiment + poly(Olaparib,2)*siRNA*genotype, data = dataset)
print(summary(fit5))
##
## Call:
## lm(formula = Counts ~ Experiment + poly(Olaparib, 2) * siRNA *
## genotype, data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -82.799 -20.793 2.271 18.236 94.158
##
## Coefficients:
## Estimate Std. Error t value
## (Intercept) 136.77 14.44 9.472
## Experimentexp2 50.69 14.44 3.510
## Experimentexp3 105.25 14.44 7.289
## poly(Olaparib, 2)1 -466.93 81.68 -5.717
## poly(Olaparib, 2)2 -186.06 81.68 -2.278
## siRNAsiPARP1 12.75 16.67 0.765
## genotypeALC1KO -111.17 16.67 -6.668
## poly(Olaparib, 2)1:siRNAsiPARP1 93.10 115.51 0.806
## poly(Olaparib, 2)2:siRNAsiPARP1 63.02 115.51 0.546
## poly(Olaparib, 2)1:genotypeALC1KO 7.95 115.51 0.069
## poly(Olaparib, 2)2:genotypeALC1KO 322.38 115.51 2.791
## siRNAsiPARP1:genotypeALC1KO 68.50 23.58 2.905
## poly(Olaparib, 2)1:siRNAsiPARP1:genotypeALC1KO -59.17 163.36 -0.362
## poly(Olaparib, 2)2:siRNAsiPARP1:genotypeALC1KO -317.01 163.36 -1.941
## Pr(>|t|)
## (Intercept) 4.59e-11 ***
## Experimentexp2 0.00128 **
## Experimentexp3 1.93e-08 ***
## poly(Olaparib, 2)1 2.01e-06 ***
## poly(Olaparib, 2)2 0.02914 *
## siRNAsiPARP1 0.44972
## genotypeALC1KO 1.19e-07 ***
## poly(Olaparib, 2)1:siRNAsiPARP1 0.42587
## poly(Olaparib, 2)2:siRNAsiPARP1 0.58895
## poly(Olaparib, 2)1:genotypeALC1KO 0.94553
## poly(Olaparib, 2)2:genotypeALC1KO 0.00856 **
## siRNAsiPARP1:genotypeALC1KO 0.00641 **
## poly(Olaparib, 2)1:siRNAsiPARP1:genotypeALC1KO 0.71944
## poly(Olaparib, 2)2:siRNAsiPARP1:genotypeALC1KO 0.06064 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 40.84 on 34 degrees of freedom
## Multiple R-squared: 0.878, Adjusted R-squared: 0.8313
## F-statistic: 18.82 on 13 and 34 DF, p-value: 7.868e-12
cat("AIC: ", AIC(fit5))
## AIC: 505.7933
simres <- simulateResiduals(fittedModel = fit5)
plot(simres)

fit6 <- lm(NormCounts ~ poly(Olaparib,2)*siRNA*genotype, data = dataset)
print(summary(fit6))
##
## Call:
## lm(formula = NormCounts ~ poly(Olaparib, 2) * siRNA * genotype,
## data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.154949 -0.038710 0.005231 0.034999 0.154487
##
## Coefficients:
## Estimate Std. Error t value
## (Intercept) 1.000e+00 2.178e-02 45.921
## poly(Olaparib, 2)1 -2.487e+00 1.509e-01 -16.481
## poly(Olaparib, 2)2 -1.025e+00 1.509e-01 -6.791
## siRNAsiPARP1 -2.100e-16 3.080e-02 0.000
## genotypeALC1KO -1.290e-16 3.080e-02 0.000
## poly(Olaparib, 2)1:siRNAsiPARP1 6.382e-01 2.134e-01 2.991
## poly(Olaparib, 2)2:siRNAsiPARP1 3.941e-01 2.134e-01 1.847
## poly(Olaparib, 2)1:genotypeALC1KO -3.401e+00 2.134e-01 -15.938
## poly(Olaparib, 2)2:genotypeALC1KO 2.830e+00 2.134e-01 13.262
## siRNAsiPARP1:genotypeALC1KO -2.950e-17 4.355e-02 0.000
## poly(Olaparib, 2)1:siRNAsiPARP1:genotypeALC1KO 2.626e+00 3.017e-01 8.704
## poly(Olaparib, 2)2:siRNAsiPARP1:genotypeALC1KO -2.951e+00 3.017e-01 -9.779
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## poly(Olaparib, 2)1 < 2e-16 ***
## poly(Olaparib, 2)2 6.18e-08 ***
## siRNAsiPARP1 1.00000
## genotypeALC1KO 1.00000
## poly(Olaparib, 2)1:siRNAsiPARP1 0.00499 **
## poly(Olaparib, 2)2:siRNAsiPARP1 0.07301 .
## poly(Olaparib, 2)1:genotypeALC1KO < 2e-16 ***
## poly(Olaparib, 2)2:genotypeALC1KO 2.01e-15 ***
## siRNAsiPARP1:genotypeALC1KO 1.00000
## poly(Olaparib, 2)1:siRNAsiPARP1:genotypeALC1KO 2.21e-10 ***
## poly(Olaparib, 2)2:siRNAsiPARP1:genotypeALC1KO 1.13e-11 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07544 on 36 degrees of freedom
## Multiple R-squared: 0.9857, Adjusted R-squared: 0.9813
## F-statistic: 225.3 on 11 and 36 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit6))
## AIC: -99.69902
simres <- simulateResiduals(fittedModel = fit6)
plot(simres)

fit7 <- lm(NormCounts2 ~ poly(Olaparib,2)*siRNA*genotype, data = dataset)
print(summary(fit7))
##
## Call:
## lm(formula = NormCounts2 ~ poly(Olaparib, 2) * siRNA * genotype,
## data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.10741 -0.02228 0.00343 0.02370 0.11733
##
## Coefficients:
## Estimate Std. Error t value
## (Intercept) 0.72674 0.01398 51.966
## poly(Olaparib, 2)1 -1.80709 0.09689 -18.651
## poly(Olaparib, 2)2 -0.74460 0.09689 -7.685
## siRNAsiPARP1 0.03274 0.01978 1.655
## genotypeALC1KO -0.32149 0.01978 -16.255
## poly(Olaparib, 2)1:siRNAsiPARP1 0.40330 0.13702 2.943
## poly(Olaparib, 2)2:siRNAsiPARP1 0.26573 0.13702 1.939
## poly(Olaparib, 2)1:genotypeALC1KO -0.57866 0.13702 -4.223
## poly(Olaparib, 2)2:genotypeALC1KO 1.47615 0.13702 10.773
## siRNAsiPARP1:genotypeALC1KO 0.25518 0.02797 9.123
## poly(Olaparib, 2)1:siRNAsiPARP1:genotypeALC1KO 0.16459 0.19378 0.849
## poly(Olaparib, 2)2:siRNAsiPARP1:genotypeALC1KO -1.51820 0.19378 -7.835
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## poly(Olaparib, 2)1 < 2e-16 ***
## poly(Olaparib, 2)2 4.24e-09 ***
## siRNAsiPARP1 0.106589
## genotypeALC1KO < 2e-16 ***
## poly(Olaparib, 2)1:siRNAsiPARP1 0.005654 **
## poly(Olaparib, 2)2:siRNAsiPARP1 0.060334 .
## poly(Olaparib, 2)1:genotypeALC1KO 0.000156 ***
## poly(Olaparib, 2)2:genotypeALC1KO 8.19e-13 ***
## siRNAsiPARP1:genotypeALC1KO 6.80e-11 ***
## poly(Olaparib, 2)1:siRNAsiPARP1:genotypeALC1KO 0.401300
## poly(Olaparib, 2)2:siRNAsiPARP1:genotypeALC1KO 2.73e-09 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.04845 on 36 degrees of freedom
## Multiple R-squared: 0.9831, Adjusted R-squared: 0.9779
## F-statistic: 190.2 on 11 and 36 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit7))
## AIC: -142.2131
simres <- simulateResiduals(fittedModel = fit7)
plot(simres)

fit8 <- lmer(Counts ~ poly(Olaparib,2)*siRNA*genotype + (1|UID), data = dataset)
print(summary(fit8))
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Counts ~ poly(Olaparib, 2) * siRNA * genotype + (1 | UID)
## Data: dataset
##
## REML criterion at convergence: 367.1
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -1.52447 -0.58141 -0.02631 0.42330 1.74095
##
## Random effects:
## Groups Name Variance Std.Dev.
## UID (Intercept) 3579.2 59.83
## Residual 856.5 29.27
## Number of obs: 48, groups: UID, 12
##
## Fixed effects:
## Estimate Std. Error df
## (Intercept) 188.75 35.56 8.00
## poly(Olaparib, 2)1 -466.93 58.53 28.00
## poly(Olaparib, 2)2 -186.06 58.53 28.00
## siRNAsiPARP1 12.75 50.29 8.00
## genotypeALC1KO -111.17 50.29 8.00
## poly(Olaparib, 2)1:siRNAsiPARP1 93.10 82.78 28.00
## poly(Olaparib, 2)2:siRNAsiPARP1 63.02 82.78 28.00
## poly(Olaparib, 2)1:genotypeALC1KO 7.95 82.78 28.00
## poly(Olaparib, 2)2:genotypeALC1KO 322.38 82.78 28.00
## siRNAsiPARP1:genotypeALC1KO 68.50 71.12 8.00
## poly(Olaparib, 2)1:siRNAsiPARP1:genotypeALC1KO -59.17 117.06 28.00
## poly(Olaparib, 2)2:siRNAsiPARP1:genotypeALC1KO -317.01 117.06 28.00
## t value Pr(>|t|)
## (Intercept) 5.308 0.000721 ***
## poly(Olaparib, 2)1 -7.977 1.09e-08 ***
## poly(Olaparib, 2)2 -3.179 0.003593 **
## siRNAsiPARP1 0.254 0.806247
## genotypeALC1KO -2.211 0.058028 .
## poly(Olaparib, 2)1:siRNAsiPARP1 1.125 0.270268
## poly(Olaparib, 2)2:siRNAsiPARP1 0.761 0.452854
## poly(Olaparib, 2)1:genotypeALC1KO 0.096 0.924173
## poly(Olaparib, 2)2:genotypeALC1KO 3.895 0.000557 ***
## siRNAsiPARP1:genotypeALC1KO 0.963 0.363663
## poly(Olaparib, 2)1:siRNAsiPARP1:genotypeALC1KO -0.505 0.617201
## poly(Olaparib, 2)2:siRNAsiPARP1:genotypeALC1KO -2.708 0.011410 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) pl(O,2)1 pl(O,2)2 sRNAsPARP1 gALC1K pl(O,2)1:RNAPARP1
## ply(Olp,2)1 0.000
## ply(Olp,2)2 0.000 0.000
## siRNAsPARP1 -0.707 0.000 0.000
## gntypALC1KO -0.707 0.000 0.000 0.500
## pl(O,2)1:RNAPARP1 0.000 -0.707 0.000 0.000 0.000
## pl(O,2)2:RNAPARP1 0.000 0.000 -0.707 0.000 0.000 0.000
## p(O,2)1:ALC 0.000 -0.707 0.000 0.000 0.000 0.500
## p(O,2)2:ALC 0.000 0.000 -0.707 0.000 0.000 0.000
## sRNAPARP1:A 0.500 0.000 0.000 -0.707 -0.707 0.000
## p(O,2)1:RNAPARP1: 0.000 0.500 0.000 0.000 0.000 -0.707
## p(O,2)2:RNAPARP1: 0.000 0.000 0.500 0.000 0.000 0.000
## pl(O,2)2:RNAPARP1 p(O,2)1:A p(O,2)2:A sRNAPARP1:
## ply(Olp,2)1
## ply(Olp,2)2
## siRNAsPARP1
## gntypALC1KO
## pl(O,2)1:RNAPARP1
## pl(O,2)2:RNAPARP1
## p(O,2)1:ALC 0.000
## p(O,2)2:ALC 0.500 0.000
## sRNAPARP1:A 0.000 0.000 0.000
## p(O,2)1:RNAPARP1: 0.000 -0.707 0.000 0.000
## p(O,2)2:RNAPARP1: -0.707 0.000 -0.707 0.000
## p(O,2)1:RNAPARP1:
## ply(Olp,2)1
## ply(Olp,2)2
## siRNAsPARP1
## gntypALC1KO
## pl(O,2)1:RNAPARP1
## pl(O,2)2:RNAPARP1
## p(O,2)1:ALC
## p(O,2)2:ALC
## sRNAPARP1:A
## p(O,2)1:RNAPARP1:
## p(O,2)2:RNAPARP1: 0.000
cat("AIC: ", AIC(fit8))
## AIC: 395.1106
simres <- simulateResiduals(fittedModel = fit8)
plot(simres)

Cubic formula
fit9 <- lm(Counts ~ Experiment + poly(Olaparib,3)*siRNA*genotype, data = dataset)
print(summary(fit9))
##
## Call:
## lm(formula = Counts ~ Experiment + poly(Olaparib, 3) * siRNA *
## genotype, data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -80.687 -12.203 -2.542 15.125 89.062
##
## Coefficients:
## Estimate Std. Error t value
## (Intercept) 136.77 15.13 9.038
## Experimentexp2 50.69 15.13 3.349
## Experimentexp3 105.25 15.13 6.955
## poly(Olaparib, 3)1 -466.93 85.61 -5.454
## poly(Olaparib, 3)2 -186.06 85.61 -2.173
## poly(Olaparib, 3)3 51.35 85.61 0.600
## siRNAsiPARP1 12.75 17.48 0.730
## genotypeALC1KO -111.17 17.48 -6.362
## poly(Olaparib, 3)1:siRNAsiPARP1 93.10 121.07 0.769
## poly(Olaparib, 3)2:siRNAsiPARP1 63.02 121.07 0.520
## poly(Olaparib, 3)3:siRNAsiPARP1 -107.17 121.07 -0.885
## poly(Olaparib, 3)1:genotypeALC1KO 7.95 121.07 0.066
## poly(Olaparib, 3)2:genotypeALC1KO 322.38 121.07 2.663
## poly(Olaparib, 3)3:genotypeALC1KO -52.55 121.07 -0.434
## siRNAsiPARP1:genotypeALC1KO 68.50 24.71 2.772
## poly(Olaparib, 3)1:siRNAsiPARP1:genotypeALC1KO -59.17 171.22 -0.346
## poly(Olaparib, 3)2:siRNAsiPARP1:genotypeALC1KO -317.01 171.22 -1.851
## poly(Olaparib, 3)3:siRNAsiPARP1:genotypeALC1KO 143.25 171.22 0.837
## Pr(>|t|)
## (Intercept) 4.57e-10 ***
## Experimentexp2 0.00220 **
## Experimentexp3 1.00e-07 ***
## poly(Olaparib, 3)1 6.46e-06 ***
## poly(Olaparib, 3)2 0.03778 *
## poly(Olaparib, 3)3 0.55309
## siRNAsiPARP1 0.47128
## genotypeALC1KO 5.10e-07 ***
## poly(Olaparib, 3)1:siRNAsiPARP1 0.44793
## poly(Olaparib, 3)2:siRNAsiPARP1 0.60654
## poly(Olaparib, 3)3:siRNAsiPARP1 0.38309
## poly(Olaparib, 3)1:genotypeALC1KO 0.94808
## poly(Olaparib, 3)2:genotypeALC1KO 0.01234 *
## poly(Olaparib, 3)3:genotypeALC1KO 0.66733
## siRNAsiPARP1:genotypeALC1KO 0.00948 **
## poly(Olaparib, 3)1:siRNAsiPARP1:genotypeALC1KO 0.73207
## poly(Olaparib, 3)2:siRNAsiPARP1:genotypeALC1KO 0.07397 .
## poly(Olaparib, 3)3:siRNAsiPARP1:genotypeALC1KO 0.40941
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 42.8 on 30 degrees of freedom
## Multiple R-squared: 0.8817, Adjusted R-squared: 0.8147
## F-statistic: 13.16 on 17 and 30 DF, p-value: 1.501e-09
cat("AIC: ", AIC(fit9))
## AIC: 512.2951
simres <- simulateResiduals(fittedModel = fit9)
plot(simres)

fit10 <- lm(NormCounts ~ poly(Olaparib,3)*siRNA*genotype, data = dataset)
print(summary(fit10))
##
## Call:
## lm(formula = NormCounts ~ poly(Olaparib, 3) * siRNA * genotype,
## data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.131742 -0.029948 0.002213 0.028289 0.141793
##
## Coefficients:
## Estimate Std. Error t value
## (Intercept) 1.000e+00 2.045e-02 48.888
## poly(Olaparib, 3)1 -2.487e+00 1.417e-01 -17.546
## poly(Olaparib, 3)2 -1.025e+00 1.417e-01 -7.230
## poly(Olaparib, 3)3 2.058e-01 1.417e-01 1.452
## siRNAsiPARP1 -1.743e-16 2.893e-02 0.000
## genotypeALC1KO -1.705e-16 2.893e-02 0.000
## poly(Olaparib, 3)1:siRNAsiPARP1 6.382e-01 2.004e-01 3.184
## poly(Olaparib, 3)2:siRNAsiPARP1 3.941e-01 2.004e-01 1.966
## poly(Olaparib, 3)3:siRNAsiPARP1 -5.388e-01 2.004e-01 -2.688
## poly(Olaparib, 3)1:genotypeALC1KO -3.401e+00 2.004e-01 -16.967
## poly(Olaparib, 3)2:genotypeALC1KO 2.830e+00 2.004e-01 14.119
## poly(Olaparib, 3)3:genotypeALC1KO -2.493e-01 2.004e-01 -1.244
## siRNAsiPARP1:genotypeALC1KO -4.743e-17 4.091e-02 0.000
## poly(Olaparib, 3)1:siRNAsiPARP1:genotypeALC1KO 2.626e+00 2.834e-01 9.266
## poly(Olaparib, 3)2:siRNAsiPARP1:genotypeALC1KO -2.951e+00 2.834e-01 -10.411
## poly(Olaparib, 3)3:siRNAsiPARP1:genotypeALC1KO 7.294e-01 2.834e-01 2.574
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## poly(Olaparib, 3)1 < 2e-16 ***
## poly(Olaparib, 3)2 3.26e-08 ***
## poly(Olaparib, 3)3 0.15621
## siRNAsiPARP1 1.00000
## genotypeALC1KO 1.00000
## poly(Olaparib, 3)1:siRNAsiPARP1 0.00323 **
## poly(Olaparib, 3)2:siRNAsiPARP1 0.05801 .
## poly(Olaparib, 3)3:siRNAsiPARP1 0.01130 *
## poly(Olaparib, 3)1:genotypeALC1KO < 2e-16 ***
## poly(Olaparib, 3)2:genotypeALC1KO 2.69e-15 ***
## poly(Olaparib, 3)3:genotypeALC1KO 0.22257
## siRNAsiPARP1:genotypeALC1KO 1.00000
## poly(Olaparib, 3)1:siRNAsiPARP1:genotypeALC1KO 1.41e-10 ***
## poly(Olaparib, 3)2:siRNAsiPARP1:genotypeALC1KO 8.39e-12 ***
## poly(Olaparib, 3)3:siRNAsiPARP1:genotypeALC1KO 0.01490 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07086 on 32 degrees of freedom
## Multiple R-squared: 0.9888, Adjusted R-squared: 0.9835
## F-statistic: 187.8 on 15 and 32 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit10))
## AIC: -103.3635
simres <- simulateResiduals(fittedModel = fit10)
plot(simres)

fit11 <- lm(NormCounts2 ~ poly(Olaparib,3)*siRNA*genotype, data = dataset)
print(summary(fit11))
##
## Call:
## lm(formula = NormCounts2 ~ poly(Olaparib, 3) * siRNA * genotype,
## data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.085863 -0.019458 0.001602 0.013273 0.098286
##
## Coefficients:
## Estimate Std. Error t value
## (Intercept) 0.72674 0.01252 58.028
## poly(Olaparib, 3)1 -1.80709 0.08677 -20.827
## poly(Olaparib, 3)2 -0.74460 0.08677 -8.582
## poly(Olaparib, 3)3 0.14955 0.08677 1.724
## siRNAsiPARP1 0.03274 0.01771 1.848
## genotypeALC1KO -0.32149 0.01771 -18.151
## poly(Olaparib, 3)1:siRNAsiPARP1 0.40330 0.12271 3.287
## poly(Olaparib, 3)2:siRNAsiPARP1 0.26573 0.12271 2.166
## poly(Olaparib, 3)3:siRNAsiPARP1 -0.40247 0.12271 -3.280
## poly(Olaparib, 3)1:genotypeALC1KO -0.57866 0.12271 -4.716
## poly(Olaparib, 3)2:genotypeALC1KO 1.47615 0.12271 12.030
## poly(Olaparib, 3)3:genotypeALC1KO -0.16718 0.12271 -1.362
## siRNAsiPARP1:genotypeALC1KO 0.25518 0.02505 10.188
## poly(Olaparib, 3)1:siRNAsiPARP1:genotypeALC1KO 0.16459 0.17354 0.948
## poly(Olaparib, 3)2:siRNAsiPARP1:genotypeALC1KO -1.51820 0.17354 -8.749
## poly(Olaparib, 3)3:siRNAsiPARP1:genotypeALC1KO 0.52209 0.17354 3.009
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## poly(Olaparib, 3)1 < 2e-16 ***
## poly(Olaparib, 3)2 8.32e-10 ***
## poly(Olaparib, 3)3 0.09444 .
## siRNAsiPARP1 0.07383 .
## genotypeALC1KO < 2e-16 ***
## poly(Olaparib, 3)1:siRNAsiPARP1 0.00246 **
## poly(Olaparib, 3)2:siRNAsiPARP1 0.03791 *
## poly(Olaparib, 3)3:siRNAsiPARP1 0.00251 **
## poly(Olaparib, 3)1:genotypeALC1KO 4.53e-05 ***
## poly(Olaparib, 3)2:genotypeALC1KO 2.05e-13 ***
## poly(Olaparib, 3)3:genotypeALC1KO 0.18257
## siRNAsiPARP1:genotypeALC1KO 1.44e-11 ***
## poly(Olaparib, 3)1:siRNAsiPARP1:genotypeALC1KO 0.35001
## poly(Olaparib, 3)2:siRNAsiPARP1:genotypeALC1KO 5.37e-10 ***
## poly(Olaparib, 3)3:siRNAsiPARP1:genotypeALC1KO 0.00508 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.04338 on 32 degrees of freedom
## Multiple R-squared: 0.9879, Adjusted R-squared: 0.9823
## F-statistic: 174.8 on 15 and 32 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit11))
## AIC: -150.4599
simres <- simulateResiduals(fittedModel = fit11)
plot(simres)

fit12 <- lmer(Counts ~ poly(Olaparib,3)*siRNA*genotype + (1|UID), data = dataset)
print(summary(fit12))
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Counts ~ poly(Olaparib, 3) * siRNA * genotype + (1 | UID)
## Data: dataset
##
## REML criterion at convergence: 325.1
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -1.57704 -0.47088 -0.06373 0.41746 1.52191
##
## Random effects:
## Groups Name Variance Std.Dev.
## UID (Intercept) 3561.7 59.68
## Residual 926.6 30.44
## Number of obs: 48, groups: UID, 12
##
## Fixed effects:
## Estimate Std. Error df
## (Intercept) 188.75 35.56 8.00
## poly(Olaparib, 3)1 -466.93 60.88 24.00
## poly(Olaparib, 3)2 -186.06 60.88 24.00
## poly(Olaparib, 3)3 51.35 60.88 24.00
## siRNAsiPARP1 12.75 50.29 8.00
## genotypeALC1KO -111.17 50.29 8.00
## poly(Olaparib, 3)1:siRNAsiPARP1 93.10 86.10 24.00
## poly(Olaparib, 3)2:siRNAsiPARP1 63.02 86.10 24.00
## poly(Olaparib, 3)3:siRNAsiPARP1 -107.17 86.10 24.00
## poly(Olaparib, 3)1:genotypeALC1KO 7.95 86.10 24.00
## poly(Olaparib, 3)2:genotypeALC1KO 322.38 86.10 24.00
## poly(Olaparib, 3)3:genotypeALC1KO -52.55 86.10 24.00
## siRNAsiPARP1:genotypeALC1KO 68.50 71.12 8.00
## poly(Olaparib, 3)1:siRNAsiPARP1:genotypeALC1KO -59.17 121.76 24.00
## poly(Olaparib, 3)2:siRNAsiPARP1:genotypeALC1KO -317.01 121.76 24.00
## poly(Olaparib, 3)3:siRNAsiPARP1:genotypeALC1KO 143.25 121.76 24.00
## t value Pr(>|t|)
## (Intercept) 5.308 0.000721 ***
## poly(Olaparib, 3)1 -7.669 6.6e-08 ***
## poly(Olaparib, 3)2 -3.056 0.005430 **
## poly(Olaparib, 3)3 0.844 0.407262
## siRNAsiPARP1 0.254 0.806247
## genotypeALC1KO -2.211 0.058028 .
## poly(Olaparib, 3)1:siRNAsiPARP1 1.081 0.290314
## poly(Olaparib, 3)2:siRNAsiPARP1 0.732 0.471316
## poly(Olaparib, 3)3:siRNAsiPARP1 -1.245 0.225243
## poly(Olaparib, 3)1:genotypeALC1KO 0.092 0.927200
## poly(Olaparib, 3)2:genotypeALC1KO 3.744 0.001003 **
## poly(Olaparib, 3)3:genotypeALC1KO -0.610 0.547332
## siRNAsiPARP1:genotypeALC1KO 0.963 0.363663
## poly(Olaparib, 3)1:siRNAsiPARP1:genotypeALC1KO -0.486 0.631416
## poly(Olaparib, 3)2:siRNAsiPARP1:genotypeALC1KO -2.603 0.015581 *
## poly(Olaparib, 3)3:siRNAsiPARP1:genotypeALC1KO 1.176 0.250951
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
cat("AIC: ", AIC(fit12))
## AIC: 361.0916
simres <- simulateResiduals(fittedModel = fit12)
plot(simres)

Final Result
fit <- fit11
output <- coef(summary(fit))
output <- output[grep("Olaparib", rownames(output)),]
rownames(output) <- gsub("poly\\(|, [1-3]\\)","", rownames(output) )
rownames(output) <- gsub("genotype", paste0(" ",levels(dataset$genotype)[1], " vs. "), rownames(output))
rownames(output)[!(grepl("vs", rownames(output)))] <- paste(rownames(output)[!(grepl("vs", rownames(output)))], levels(dataset$genotype)[1], sep = " in " )
rownames(output) <- gsub("siRNA", paste0(" ",levels(dataset$siRNA)[1], " vs. "), rownames(output))
rownames(output)[!(grepl("vs.*vs| in ", rownames(output)))] <- paste(rownames(output)[!(grepl("vs.*vs| in ", rownames(output)))], levels(dataset$siRNA)[1], sep = " in " )
rownames(output)[!(grepl("vs", rownames(output)))] <- paste(rownames(output)[!(grepl("vs", rownames(output)))], levels(dataset$siRNA)[1], sep = " " )
# suggested result table
kable(output, row.names = T)
| Olaparib1 in WT siCtrl |
-1.8070860 |
0.0867681 |
-20.8266249 |
0.0000000 |
| Olaparib2 in WT siCtrl |
-0.7446048 |
0.0867681 |
-8.5815537 |
0.0000000 |
| Olaparib3 in WT siCtrl |
0.1495508 |
0.0867681 |
1.7235695 |
0.0944365 |
| Olaparib1: siCtrl vs. siPARP1 in WT |
0.4032997 |
0.1227086 |
3.2866463 |
0.0024649 |
| Olaparib2: siCtrl vs. siPARP1 in WT |
0.2657308 |
0.1227086 |
2.1655438 |
0.0379076 |
| Olaparib3: siCtrl vs. siPARP1 in WT |
-0.4024657 |
0.1227086 |
-3.2798500 |
0.0025096 |
| Olaparib1: WT vs. ALC1KO in siCtrl |
-0.5786582 |
0.1227086 |
-4.7157109 |
0.0000453 |
| Olaparib2: WT vs. ALC1KO in siCtrl |
1.4761548 |
0.1227086 |
12.0297605 |
0.0000000 |
| Olaparib3: WT vs. ALC1KO in siCtrl |
-0.1671846 |
0.1227086 |
-1.3624523 |
0.1825682 |
| Olaparib1: siCtrl vs. siPARP1: WT vs. ALC1KO |
0.1645883 |
0.1735361 |
0.9484384 |
0.3500144 |
| Olaparib2: siCtrl vs. siPARP1: WT vs. ALC1KO |
-1.5182037 |
0.1735361 |
-8.7486312 |
0.0000000 |
| Olaparib3: siCtrl vs. siPARP1: WT vs. ALC1KO |
0.5220878 |
0.1735361 |
3.0085252 |
0.0050828 |
write.table(output, file = "FigureS1C_Stats_Ref_WT.txt", quote = F, sep = "\t", row.names = T, col.names = NA)
# re-fit with ALC1KO reference
dataset$genotype <- relevel(dataset$genotype, ref = "ALC1KO")
fit <- lm(NormCounts2 ~ poly(Olaparib,3)*siRNA*genotype, data = dataset)
output <- coef(summary(fit))
output <- output[grep("Olaparib", rownames(output)),]
rownames(output) <- gsub("poly\\(|, [1-3]\\)","", rownames(output) )
rownames(output) <- gsub("genotype", paste0(" ",levels(dataset$genotype)[1], " vs. "), rownames(output))
rownames(output)[!(grepl("vs", rownames(output)))] <- paste(rownames(output)[!(grepl("vs", rownames(output)))], levels(dataset$genotype)[1], sep = " in " )
rownames(output) <- gsub("siRNA", paste0(" ",levels(dataset$siRNA)[1], " vs. "), rownames(output))
rownames(output)[!(grepl("vs.*vs| in ", rownames(output)))] <- paste(rownames(output)[!(grepl("vs.*vs| in ", rownames(output)))], levels(dataset$siRNA)[1], sep = " in " )
rownames(output)[!(grepl("vs", rownames(output)))] <- paste(rownames(output)[!(grepl("vs", rownames(output)))], levels(dataset$siRNA)[1], sep = " " )
# suggested result table
kable(output, row.names = T)
| Olaparib1 in ALC1KO siCtrl |
-2.3857442 |
0.0867681 |
-27.4956473 |
0.0000000 |
| Olaparib2 in ALC1KO siCtrl |
0.7315500 |
0.0867681 |
8.4310967 |
0.0000000 |
| Olaparib3 in ALC1KO siCtrl |
-0.0176338 |
0.0867681 |
-0.2032291 |
0.8402428 |
| Olaparib1: siCtrl vs. siPARP1 in ALC1KO |
0.5678880 |
0.1227086 |
4.6279408 |
0.0000584 |
| Olaparib2: siCtrl vs. siPARP1 in ALC1KO |
-1.2524729 |
0.1227086 |
-10.2068890 |
0.0000000 |
| Olaparib3: siCtrl vs. siPARP1 in ALC1KO |
0.1196221 |
0.1227086 |
0.9748471 |
0.3369483 |
| Olaparib1: ALC1KO vs. WT in siCtrl |
0.5786582 |
0.1227086 |
4.7157109 |
0.0000453 |
| Olaparib2: ALC1KO vs. WT in siCtrl |
-1.4761548 |
0.1227086 |
-12.0297605 |
0.0000000 |
| Olaparib3: ALC1KO vs. WT in siCtrl |
0.1671846 |
0.1227086 |
1.3624523 |
0.1825682 |
| Olaparib1: siCtrl vs. siPARP1: ALC1KO vs. WT |
-0.1645883 |
0.1735361 |
-0.9484384 |
0.3500144 |
| Olaparib2: siCtrl vs. siPARP1: ALC1KO vs. WT |
1.5182037 |
0.1735361 |
8.7486312 |
0.0000000 |
| Olaparib3: siCtrl vs. siPARP1: ALC1KO vs. WT |
-0.5220878 |
0.1735361 |
-3.0085252 |
0.0050828 |
write.table(output, file = "FigureS1C_Stats_Ref_ALC1.txt", quote = F, sep = "\t", row.names = T, col.names = NA)